#继承的基础语法
#演示单继承
class Phone:
    IMEI=None#序列号
    producer="HM"#厂商
    def call_by_4g(self):
        print("4g通话")
class Phone2025(Phone):
    face_id="100001"
    def call_by_5g(self):
        print("5g通话")
phone=Phone2025()
print(phone.producer)
phone.call_by_5g()
phone.call_by_4g()
class NFCreader:
    NFC_type="第五代"
    producer="HM"
    def read_card(self):
        print("NFC读卡")
class RemoteControl:
    rc_type="红外遥控"
    def control(self):
        print("红外遥控开启了")

class my_phone(Phone,NFCreader,RemoteControl):#如果父类成员名相同，采用就近原则，如左边，(Phone,NFCreader,RemoteControl)优先级为从左往右
    pass #补全语法，pass表示空，可以让语法不报错
phone20=my_phone()
phone20.call_by_4g()
print(phone20.NFC_type)
print(phone20.rc_type)
print("111\n",phone20.control())
phone20.read_card()
